
import yaml

def read_yaml(filename):

    # 读取文件
    file  = open(file=filename,mode="rb")

    # 将文件转换字典格式
    data = yaml.load(file,Loader=yaml.SafeLoader)

    return data




























